<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class UserRobe extends Model
{
    const IS_BUY = 1;
    const IS_BORROW = 0;

    protected $table = 'user_robe';
    protected $guarded = [];

    public function commodity()
    {
        return $this->hasOne(Commodity::class,'id','commodity_id');
    }
    public function commodityAttr()
    {
        return $this->hasOne(CommodityAttr::class,'id','commodity_attr_id');
    }

    public function shopcom()
    {
        return $this->hasOne(ShopCom::class,'id','shop_com_id');
    }

}
